/**
 * Created by ElecRoc6 on 2017/6/8.
 */
app.controller('qaCtrl',
    ['$scope','$location','$routeParams','$http','$sce','$rootScope','$anchorScroll', function ($scope,$location,$routeParams,$http,$sce,$rootScope,$anchorScroll) {
        //fileId
        var articleId =$routeParams.fileId;
        
		$http.jsonp(qaUrl+'siteID=1&fileId='+articleId+'&jsoncallback=JSON_CALLBACK'
	    ).success(function(data){
	    	console.log('这是我的');
	    	console.log(data);
	    	$scope.title = data.title;
	    	$scope.publishTime = data.publishtime;
	    	$scope.content = data.content;
	    	$scope.imgs = data.pics;
	    	$scope.answer = data.answer;
	    	$scope.userIcon = data.userIcon;
	    	$scope.userName = data.userName;
	    	if(!$scope.answer){
	    		$(".review").hide();
	    		$(".blank").hide();
	    	}
	        }).error(function(data){
				alert('数据出错了')
        });


}])